<?php
namespace app\admin\controller;

use app\BaseController;
use app\common\modules\user\services\UserService;
use app\Request;

class UserController extends BaseController
{
    public function index(Request $request)
    {
//        $user = UserService::getRecord(7525434, ['token']);

        $result = UserService::registerUser([
            'name' => '111'
        ]);



        if (!$result['status']) {
            return json_encode([
                'status' => false,
                'message' => $result['message']
            ]);
        }

        dd([
            'param' => $request->get('aaa'),
            'app_token' => $request->app_token,
            'user_token' => $request->user_token,
            'user' => $user->toArray()
        ]);

        return 'user_index';
    }


}